﻿@model TS2015.Models.TbThoiGian
@using Kendo.Mvc.UI

<div class="editor-label">
    <label for="Mo">Thời gian mở: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().DatePickerFor(m => m.Mo).Format("MM/dd/yyyy")
            //.Name("start")
            //.Value("10/10/2011")
            //.Max("10/10/2012")
            //.Events(e => e.Change("startChange"))
    )

</div>
<div class="editor-label">
    <label for="Dong">Thời gian đóng: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().DatePickerFor(m => m.Dong).Format("MM/dd/yyyy")
            //.Name("start")
            //.Value("10/10/2011")
            ////.Max("10/10/2012")
            //.Events(e => e.Change("startChange"))
    )

</div>
@*<script>
        $('#Mo').change(function (e) {
            var endPicker = $("#end").data("kendoDatePicker");
            var startDate = this.value();

            if (startDate) {
                startDate = new Date(startDate);
                startDate.setDate(startDate.getDate() + 1);
                endPicker.min(startDate);
            }
        })
        $('#Dong').change(function (e) {
            var startPicker = $("#start").data("kendoDatePicker");
            var endDate = this.value();

            if (endDate) {
                endDate = new Date(endDate);
                endDate.setDate(endDate.getDate() - 1);
                startPicker.max(endDate);
            }
        });
    </script>*@